home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Linux / Kubuntu 8.10 / kubuntu-8.10-desktop-i386.iso / casper / filesystem.squashfs / var / lib / dpkg / info / libpam-runtime.postinst < prev    next >
Text File  |  2008-10-16  |  1KB  |  41 lines

  1. #!/bin/sh -e
  2.  
  3. # If the user has removed the config file, respect this sign of dementia
  4. # -- only create on package install.
  5.  
  6. if [ "$2" = "1.0.1-2ubuntu1" ]; then
  7.     sed -i -e'
  8.         /here.s the fallback if no module succeeds/,/prime the stack/ {
  9.             s/.*pam_deny.*/# this is obviously a completely redundant line, except that it lets us\
  10. # handle better the case where there are no "Primary" modules provided\
  11. session    required            pam_permit.so/
  12.         }' /etc/pam.d/common-session
  13. fi
  14.  
  15. force=
  16. if [ -z "$2" ] || dpkg --compare-versions "$2" lt 1.0.1-2ubuntu1
  17. then
  18.     force=--force
  19.     for configfile in common-auth common-account common-session  \
  20.         common-password
  21.     do
  22.         if [ -f /etc/pam.d/$configfile ] && \
  23.             ! fgrep -q `md5sum /etc/pam.d/$configfile` \
  24.             /usr/share/pam/$configfile.md5sums 2>/dev/null
  25.         then
  26.             force=
  27.         fi
  28.     done
  29. fi
  30.  
  31. pam-auth-update --package $force
  32.  
  33. if [ -n "$force" ]; then
  34.     rm -f /etc/pam.d/common-auth.pam-old \
  35.           /etc/pam.d/common-account.pam-old \
  36.           /etc/pam.d/common-password.pam-old \
  37.           /etc/pam.d/common-session.pam-old
  38. fi
  39.  
  40.  
  41.